package com.study;

import com.study.bean.UserService;
import com.study.configuration.SpringConfiguration;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

/*测试编程式事务*/
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(classes = SpringConfiguration.class)
public class TestProgrammingTransaction {

    @Autowired
    UserService userService;

    @Test
    public void test() throws Exception {
        userService.testProgrammingTransaction();
    }
}
